﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;
using DTO;

namespace Business
{
    public static class AccountTypeBUS
    {
        public static List<AccountTypeDTO> GetAccountTypeList()
        {
            return AccountTypeDAO.GetAccountTypeList();
        }

        public static bool IsAccountTypeNameExists(AccountTypeDTO dtoAccountType)
        {
            return AccountTypeDAO.FindAccountType(dtoAccountType, AccountTypeColumns .ACCOUNT_TYPE_NAME ) != null;
        }

        public static AccountTypeDTO FindAccountType(AccountTypeDTO dtoAccountType, string searchOption)
        {
            return AccountTypeDAO.FindAccountType(dtoAccountType, searchOption);
        }
              
        public static bool AddNewAccountType(AccountTypeDTO dtoAccountType)
        {
            return AccountTypeDAO.AddNewAccountType(dtoAccountType);
        }

        public static bool UpdateAccountType(AccountTypeDTO dtoAccountType)
        {
            return AccountTypeDAO.UpdateAccountType(dtoAccountType);
        }

        public static bool DeleteAAccountType(AccountTypeDTO dtoAccountType)
        {
            return AccountTypeDAO.DeleteAAccountType(dtoAccountType);
        }

        public static bool DeleteAllAccountType()
        {
            return AccountTypeDAO.DeleteAllAccountType();
        }
    }
}
